SYSINI page# 0001 next
2: COMMENT ⊗   VALID 00007 PAGES
3: C REC  PAGE   DESCRIPTION
4: C00001 00001
5: C00002 00002    BEGIN   SYSINI ↔  SUBTTL        SYSTEM INITIALIZATION - 1 SEPT 67
6: C00007 00003            MOVE    TAC,[XWD DVDIRIN+TTYATC+TTYUSE,ASSCON+ASSPRG]
7: C00009 00004    INITIALIZE ALL IODEVICES
8: C00016 00005     HERE WE SETUP ALL JOB STATUS BITS
9: C00020 00006            MOVEI   TAC,[ASCIZ /SYSTEM STARTED ON /]
10: C00022 00007     P2 INITIALIZE ROUTINE
11: C00026 ENDMK
12: C⊗;
    SYSINI page# 0002 next  prev
14: BEGIN   SYSINISUBTTL        SYSTEM INITIALIZATION - 1 SEPT 67
15: ;INITIALIZE SYSTEM DATA STORAGE
16: LIBPNT: POINT 7,.+1
17:         ASCIZ/
18: PUT THE LIBRASCOPE ON LINE OR YOU'LL SWAP ON THE 3330!
19: THEN PUSH CONTINUE.
20: /
21: 
22: SYSINI:JSP     TAC,.+1
23:         TLNE    TAC,10000       ;USER MODE?
24:         JRST    START           ;YES. SOMEONE IS RUNNING THE DMP COPY.
25:         CONO    APR,200000      ;I/O RESET
26:         CONO    PI,10400        ;PI RESET
27: JSR2:  XCT     ONCEI           ;DO ONCE-ONLY OPERATORS DIALOGUE
28:         CONO    APR,200000      ;I/O RESET AGAIN (D.R.D)
29:         CONO    PI,10400        ;CLEAR PI'S
30:         CONSO   DSK,1B27        ;LIBRASCOPE ON LINE?
31:         JRST    ONLINE          ;YES!
32:         MOVE    TAC,LIBPNT      ;GET A POINTER TO THE MESSAGE
33:         JSR     DDTTYPE         ;PRINT MESSAGE
34:         HALT    ONLINE          ;AND WAIT FOR GO AHEAD
35: ONLINE: SETZM   SYSBEG          ;ZERO SYSTEM STORAGE
36:         MOVE    TAC,[XWD SYSBEG,SYSBEG+1]
37:         BLT     TAC,SYSEND      ;CLEAR IT
38:         SETZM   STBEG
39:         MOVE    TAC,[XWD STBEG,STBEG+1]
40:         BLT     TAC,STEND
41:         SETZM   UPTIME
42:         MOVE    P,[IOWD ERRPLN,ERRPDL]
43: 
44: IFN FTDDT,<
45:         DATAI   APR,TAC         ;READ THE CONSOLE SWITCHES
46:         TLC     TAC,777         ;COMPLEMENT 9 BITS ON THE LEFT
47:         SKIPN   NOTDDT          ; ANY DDT AT ALL?
48:         TLNE    TAC,-1          ;SKIP IF WE HAVE TO TAKE SWITCHES SERIOUSLY
49:         JRST    INIDDT          ;IGNORE SWITCHES OR NO DDT
50:         TRNN    TAC,10000       ;DOES HE WANT NO DDT
51:         JRST    CKDSWP          ;HE WANTS DDT, CHECK ABOUT SWAPPING
52:         SETOM   NOTDDT          ;FLAG TO GET RID OF DDT
53:         MOVE    TAC1,[HALT AUTOLOAD]    ;MAKE A HALT 
54:         MOVEM   TAC1,DDT        ;AND PLANT IT ON TOP OF DDT
55:         MOVEI   TAC1,DDT+1      ;GET THE ADDRESS BEYOND DDT
56:         MOVEM   TAC1,SYSSIZ     ;SAVE AS SYSSIZ
57:         SETZM   36              ;NO SYMBOL TABLE POINTER
58:         JRST    INIDDT          ;CONTINUE
59: CKDSWP:
60: IFN FTDSWP,<
61:         SETOM   DDTSWP          ;ASSUME THAT HE WANT'S SWAPPING DDT
62:         TRNE    TAC,20000       ;CHECK FLAGS
63:         SETZM   DDTSWP          ;HE WANTS NO SWAPPING
64: INIDDT: SKIPN   NOTDDT          ;DOES HE WANT DDT?
65:         PUSHJ   P,DDTINI        ;YES INITIALIZE IT.
66: ;>INIDDT:
67: >;FTDDT
68: 
69:         DATAI   APR,TAC                 ;READ THE DATA SWITCHES
70:         TLC     TAC,777         
71:         TLNE    TAC,-1                  ;DO WE HAVE TO TAKE THESE SERIOUSLY?
72:         JRST    SYSIN2                  ;NO
73:         TRNE    TAC,1                   ;DOES HE WANT DDT NOW?
74:         PUSHJ   P,DDTCAL                ;YES GET IT FOR HIM.
75:         MOVSI   TAC1,-NMCELS    
76: SYSIN1: SKIPGE  MCELTB(TAC1)            ;SKIP IF NORMAL SENSE
77:         TRC     TAC,400000              ;INVERSE SENSE. COMPLEMENT THE BIT
78:         TRNN    TAC,400000              ;SKIP IF WE'RE SETTING.
79:         SETZM   @MCELTB(TAC1)           ;¬ SETTING: CLEAR THE CELL
80:         TRNE    TAC,400000              ;SKIP IF ¬ SETTING
81:         SETOM   @MCELTB(TAC1)           ;SET THE CELL
82:         ROT     TAC,1                   ;SHIFT TO INSPECT MORE BITS
83:         AOBJN   TAC1,SYSIN1             ;LOOP
84: SYSIN2:
85: 
86:         MOVE    TAC,SYSSIZ      ;PICKUP REAL SYSTEM SIZE
87:         ADDI    TAC,1777
88:         ANDCMI  TAC,1777
89:         MOVEM   TAC,SYSTOP      ;AND SAVE IT
90: 
91:         PUSHJ   P,CORINI        ; INITIALIZE CORE TABLES
92:         MOVEI   TAC,[ASCIZ /SYSTEM INITIALIZED ON /]
93:         SKIPN   INIMES          ;JUST LOADED?
94:         MOVEM   TAC,INIMES      ;NO. STORE MESSAGE.
    SYSINI page# 0003 next  prev
96:         MOVE    TAC,[XWD DVDIRIN+TTYATC+TTYUSE,ASSCON+ASSPRG]
97:         HLRZ    DEVDAT,DEVLST   ;SCAN ALL DEVICES
98: SYS1:   ANDCAM  TAC,DEVMOD(DEVDAT)      ;CLEAR DEVICE BITS
99:                                 ;DIRECTORY IN CORE, ASSIGNED BY CONSOLE, PROGRAM
100:         SETZM   DEVLOG(DEVDAT)  ;CLEAR LOGICAL NAME
101:         HLRZ    DEVDAT,DEVSER(DEVDAT)   ;LINK ONWARDS
102:         JUMPN   DEVDAT,SYS1
103:         MOVEI   TAC,IOGO                ;GET ADDRESS FOR 200 RESTART
104:         HRRM    TAC,SYSDSP              ;STUFF IT IN SYSDSP (200)
105: 
106:         MOVEI   TAC,P2INI               ; CRANK UP P2. IT IS WAITING FOR US
107:         HRRM    TAC,P2XFR               ; ALLOW P2 TO CONTINUE
108: 
109: ; HERE WE MUST DETACH AD AND XGP FROM THE SYSTEM IF THE PDP-6
110: ; IS NOT ON LINE. THE ONCE ONLY CODE SETS THE FLAG 'DETFLG'
111: 
112:         SKIPN   DETFLG          ; DO WE HAVE TO DETACH?
113:         JRST    IOGO            ; NO, PROCEED WITH SYSINI
114:         MOVEI   TAC,ASSCON      ; YES, GET THE 'ASSIGN' BIT
115:         IORM    TAC,ADDDB+DEVMOD        ; OR INTO DEVICE DATA BLOCK
116: 
117: 
118:         MOVEI   DEVDAT,ADDDB    ; GET ADDRESS OF DDB FOR PJOBN'S SAKE
119:         DPB     TAC,PJOBN       ; MAKE SURE THEY ARE ASSIGNED TO JOB 0
120: 
121:         IORM    TAC,XGPDDB+DEVMOD
122:         MOVEI   DDB,XGPDDB
123:         DPB     TAC,PJOBN
124: 
125:         IORM    TAC,ADCDDB+DEVMOD
126:         MOVEI   DDB,ADCDDB
127:         DPB     TAC,PJOBN
128: 
129:         IORM    TAC,DACDDB+DEVMOD
130:         MOVEI   DDB,DACDDB
131:         DPB     TAC,PJOBN
    SYSINI page# 0004 next  prev
133: ;INITIALIZE ALL IODEVICES
134: IOGO:   CONO    APR,733550+APRCHN       ;APR RESET (IO RESET)
135:         CONO    PI,11577                ;CLEAR PI SYSTEM
136:         MOVE    P,[IOWD ERRPLN,ERRPDL]
137:         PUSHJ   P,FMCHK                 ;ARE WE USING FAST MEMORY?
138:         JRST    IOGO                    ;NO. LET'S TRY THAT ALL AGAIN
139: IOGO1:  MOVE    AC1,TIME+P1PID          ;GET THE CURRENT TIME
140:         MOVE    AC2,THSDAT+P1PID        ;AND THE DATE
141:         MOVE    TAC,[XWD P1DATA,P1DATA+1]
142:         SETZM   P1DATA                  ;ZERO DATA AREA FOR P1
143:         BLT     TAC,P1DATA+PDATALEN-1   ;
144:         SETZM   RTIME                   
145:         SETZM   TTIME                   ;CLEAR NULL TIME TOO.
146:         SETZM   LASTDISASTER            ;AND LAST DISASTER TIME
147:         MOVEM   AC1,TIME+P1PID          ;RESTORE THE TIME
148:         MOVEM   AC1,TIME+P2PID          ;SAVE FOR BOTH PROCESSORS
149:         MOVEM   AC2,THSDAT+P1PID        ;SAVE THE DATE TOO
150:         MOVEM   AC2,THSDAT+P2PID        ;
151:         IDIVI   AC1,JIFSEC              ;CONVERT TIME TO SECONDS
152:         HRL     AC1,THSDAT              ;PUT DATE IN LEFT HALF OF AC1
153:         MOVEM   AC1,TIMDAT              ;AND SAVE <DATE>,,<TIME IN SECS>
154:         SKIPE   INIMES                  ;SKIP IF THIS IS A RESTART
155:         MOVEM   AC1,INITIM              ;SAVE TIME OF (RELOAD OR 203 RESTART).
156: IFN FTBAT,<
157:         MOVEI   TAC,=10*JIFSEC          ;WAIT 10 SECONDS 
158:         MOVEM   TAC,BATYET              ;BEFORE STARTING THE PHANTOM JOBS
159:         SETZM   ALFRED                  ;ZERO WAKEUP TIME FOR ALL PHANTOMS
160:         MOVE    TAC,[XWD ALFRED,ALFRED+1]
161:         BLT     TAC,ALFRED+BATLEN-1
162: >
163: 
164:         MOVE    TAC,[JRST UUO1]         ; SET UP PROCESSOR DATA STORAGE
165:         MOVEM   TAC,UUO0+1
166:         MOVE    TAC,[JRST UUO3]
167:         MOVEM   TAC,UUO2+1
168:         MOVEI   TAC,40
169:         MOVE    TAC1,P1NUM
170:         TLNE    TAC1,MAOFF      
171:         MOVEI   TAC,140
172:         MOVEM   TAC,UUOLOC+P1PID
173:         MOVE    TAC,[POINT 36,CIPWT-1,35]
174:         MOVEM   TAC,CLOCK
175:         MOVEI   TAC,CAT(CH,\APRCHN)
176:         MOVEM   TAC,APRCH+P1PID
177:         MOVEI   TAC,CAT(CH,\CLKCHN)
178:         MOVEM   TAC,CLKCH+P1PID
179:         MOVE    TAC,[P2PID]
180:         MOVEM   TAC,OTHERID+P1PID
181:         MOVEI   TAC,APRCON
182:         MOVEM   TAC,APRCN+P1PID
183:         MOVEI   TAC,CLKSAVE
184:         MOVEM   TAC,CLKSV+P1PID
185:         MOVEI   TAC,CLKESAVE
186:         MOVEM   TAC,CLKESV+P1PID
187:         MOVE    TAC,[JEN @UUO0]
188:         MOVEM   TAC,UUOXIT
189:         MOVEM   TAC,UUOXI
190:         MOVE    PID,[P1PID]
191:         MOVEM   PID,APRID+P1PID
192:         MOVE    P,[IOWD ERRPLN,ERRPDL]
193:         MOVEM   P,ERRPD(PID)
194:         MOVE    TAC,[IOWD APRPLN,APRPD]
195:         MOVEM   TAC,APRPDL(PID)
196:         SETOM   JBTMSK
197:         MOVE    TAC,[JBTMSK,,JBTMSK+1]
198:         BLT     TAC,JBTMSK+JOBN-1
199:         SETOM   JBTWKM
200:         MOVE    TAC,[XWD JBTWKM,JBTWKM+1]
201:         BLT     TAC,JBTWKM+JOBN-1
202: 
203:         PUSHJ   P,NXTINI        ;ALWAYS INITILIZE SCHEDULER FIST
204:                                 ;SO DEVICES MAY RESET QUEUES IF DESIRED
205:         PUSHJ   P,SPWINI        ;INITIALIZE SPACEWAR SERVICE
206:         PUSHJ   P,QINI          ; INITIALIZE QUEUE STRUCTURE
207:         PUSHJ   P,FSINIT        ; AND FREE STORAGE SYSTEM
208:         PUSHJ   P,DISINIT       ; INITIALIZE DISASTER TYPEOUT SYSTEM.
209: 
210: ;HERE WE INITIALIZE ALL THE DEVICES IN THE DEVICE LIST
211: ;NOTE THAT FREE STORAGE MUST BE SET UP
212: ;ALSO NOTE THAT EACH DEVICE MUST CORRECTLY LINK TO
213: ;THE NEXT BEFORE RETURNING
214: 
215:         HLRZ    DDB,DEVLST      ;GO UP THE DEVICE LIST, DOING GOOD THINGS
216:         SETZM   SAVITM          ;DSP OF LAST DEVICE
217: IOG0:   HRRZ    TAC,DEVSER(DDB) ;GET THE DEVICE SERVICE DISPATCH
218:         CAMN    TAC,SAVITM      ;SAME AS LAST MEANS INITIALIZED ALREADY.
219:         JRST    IOG01           ;YES
220:         MOVEM   TAC,SAVITM      ;SAVE THE DEVICE DISPATCH
221:         PUSH    P,DDB
222:         PUSHJ   P,DINI(TAC)     ;INITIALIZE THE DEVICE
223:         POP     P,DDB
224: IOG01:  MOVEI   TAC,ASSPRG
225:         ANDCAB  TAC,DEVMOD(DDB) ;TURN OF ASSIGNED BY PROG BIT
226:         HRLOI   TAC1,77         ;MAKE MASK FOR MODE BITS AND HUNG COUNT
227:         TDNE    TAC,[TTYATC,,ASSCON]    ;IF ASSIGNED BY CONSOLE THEN OR ATTACHED
228:         TLO     TAC1,770000     ;SAVE JOB NUMBER ALSO
229:         ANDM    TAC1,DEVCHR(DDB);GLONK!
230:         TLNN    TAC,DVTTY!DVLPT ;THESE GUYS ARE RIGHT(?)
231:         SETZM   DEVIOS(DDB)
232:         SETZM   DEVBUF(DDB)
233:         HLRZ    DDB,DEVSER(DDB) ;LINK ON MACDUFF
234:         JUMPN   DDB,IOG0
235:         MOVE    TAC,[RSTBEG,,RSTBEG+1]
236:         BLT     TAC,RSTEND-1
    SYSINI page# 0005 next  prev
238: ; HERE WE SETUP ALL JOB STATUS BITS
239: ; STOP ALL LOGGED IN JOBS
240: ; AND FLUSH ALL UN-LOGGED-IN JOBS
241: 
242:         MOVEI   J,JOBN-1
243:         SETZM   JOB
244: IOG2:
245: REPEAT 0,<
246:         MOVSI   TAC1,RUN1                       ;GET HIM RUN SOMEWHERE
247:         MOVEM   TAC1,JB2STS(J)
248: >
249:         MOVE    TAC1,[XWD JNA!JLOG!SWP!JSEG!JWP,77]     ;KEEP THESE
250:         AND     TAC1,JBTSTS(J)
251:         TLO     TAC1,JERR                       ;DON'T LET HIM CONTINUE
252:         MOVEM   TAC1,JBTSTS(J)
253:         TLNN    TAC1,JNA                        ;JOB HERE AT ALL?
254:         JRST    IOG4                            ;NO, LOOP AROUND FOR NEXT
255:         TLNN    TAC1,JLOG                       ;JOB LOGGED IN?
256:         JRST    IOGKIL                          ;NO, FLUSH HIM
257:         TLNE    TAC1,JSEG                       ;SEGMENT?
258:         JRST    IOG6                            ;YES. ONLY REQUE TO STOPQ
259: 
260:         PUSHJ   P,PRIBUF                        ;SETUP JOB PRIORITY TABLE
261:         PUSHJ   P,MAKPDL                        ;MAKE A PDL FOR THIS JOB.
262:         MOVEI   AC1,0                           ;NO FREE STORAGE AVAIALABLE.
263:         MOVEM   AC1,JBTPDL(J)                   ;SAVE PDL FOR USER.
264:         TLNN    TAC1,SWP                        ;SWAPPED IN?
265:         JRST    IOG5                            ;YES FLUSH DATA AREA
266:         LDB     TAC,IMGIN                       ;IS THERE ANY CORE?
267:         JUMPE   TAC,IOG4                        ;JUMP IF NO CORE: LEAVE IN NULQ
268:         TRO     TAC1,WIPEJD                     ;MAKE SURE JOB DATA AREA GETS WIPED
269:         MOVEM   TAC1,JBTSTS(J)                  ;NEXT TIME THIS IS SWAPPED IN.
270:         JRST    IOG6                            ;NO, JUST STOPQ
271: 
272: IOGKIL: TRNE    TAC1,77                         ;RH WAS ANDED WITH 77
273:         SOS     NJOBS(TAC1)                     ;NO LONGER USING SEGMENT
274:         PUSHJ   P,IOGZ                          ;FLUSH HIS CORE IMAGE
275:         PUSHJ   P,KSTOP                         ;REMOVE THE CRETIN
276:         JRST    IOG4
277: 
278: IOGZ:   PUSHJ   P,FBFLUSH                       ;RELEASE SWAP SPACE
279:         SETZB   TAC,JBTSWP(J)                   ;KILLING A PHANTOM.
280:         SETZM   JB2SWP(J)
281:         SKIPN   PROG,JBTADR(J)
282:         POPJ    P,
283:         SOS     (P)
284:         JRST    CORE1                           ;RELEASE CORE
285: 
286: IOG5:   SKIPN   JDAT,JBTDAT(J)                  ;JOB DATA AREA?
287:         JRST    IOG4                            ;NO, LEAVE IN NULQ
288:         PUSH    P,JOBDDT(JDAT)
289:         PUSHJ   P,CLRJB1
290:         POP     P,JOBDDT(JDAT)
291: IOG6:   MOVNI   TAC,STOPQ                       ;TO STOPQ
292:         MOVEM   TAC,JOBQUE(J)
293:         PUSHJ   P,REQUE
294: IOG4:   SOJG    J,IOG2
295: 
296:         MOVEI    J,JOBN-1                       ;FLUSH UNUSED SEGMENTS ON NEXT PASS
297: IOGS1:  MOVE    TAC,JBTSTS(J)
298:         TLNE    TAC,JSEG
299:         SKIPE   NJOBS(J)                        ;ANYONE USING THIS SEGMENT?
300:         JRST    IOGS2
301:         SETZM   JBTSTS(J)                       ;NO USERS: BLAST THIS SEGMENT
302:         SETZM   JOBNAM(J)
303:         SETZM   PRJPRG(J)
304:         PUSHJ   P,IOGZ
305:         MOVNI   TAC,NULQ                        ;QUEUE TO NULL Q
306:         MOVEM   TAC,JOBQUE(J)
307:         PUSHJ   P,REQUE
308: IOGS2:  SOJG    J,IOGS1                         ;LOOP
309:         SETZM   JOB                             ;AGAIN?
310: ;FORM INITIAL CHECKSUM.
311:         
312:         MOVE    TAC,[XWD CHKBEG-CHKEND,CHKBEG]  ;AOBJN POINTER
313:         MOVEM    TAC,MONPTR
314:         PUSHJ    P,CHECK
315:         MOVEM    TAC1,MONSUM
316: IFN FTSTAT, <
317:         MOVE    TAC,[POINT 18,STATS]
318:         MOVEM   TAC,STATPTR     ; INITIALIZE STATISTICS POINTER
319: >
320:         XCT     PICON           ;PION, CH 3,5,6,7, AND PARITY ERROR ENABLE
321: REPEAT 0,<      DATAO   PTR,[1]         ;ENABLE SYSTEM WR DETECTOR >
    SYSINI page# 0006 next  prev
323:         MOVEI   TAC,[ASCIZ /SYSTEM STARTED ON /]
324:         SKIPN   INIMES          ;LOAD OR INITIALIZE?
325:         MOVEM   TAC,INIMES      ;NO, IT MUST BE A START
326:         MOVSI   J,-TCONLN-1     ;NO. OF TTY LINES(REAL ONES).
327: IOG3:   SKIPN   DEVDAT,TTYTAB(J) ;GET DDB FOR NEXT TTY.
328:         JRST    IOG3A           ;OOPS, NO DDB.
329:         PUSHJ   P,CRLF          ;TYPE A CRLF
330:         MOVE    TAC1,DEVNAM(DEVDAT)
331:         PUSHJ   P,PRNAME        ;PRINT NAME OF CONSOLE
332:         MOVEI   TEM,11
333:         XCT     TYO             ;TAB
334:         MOVEI   TAC,[ASCIZ/ (DOWN) /]
335:         SKIPN   MAINTMODE
336:         SKIPE   TTYLOK
337:         PUSHJ   P,CONMES        ;TELL THEM THAT WE'RE DOWN
338:         MOVE    TAC,INIMES      ;GET THE ADDRESS OF MESSAGE
339:         PUSHJ   P,CONMES        ;SEND IT
340:         PUSHJ   P,DAYT2         ;TIME OF DAY
341:         PUSHJ   P,PRCNTC
342:         PUSHJ   P,TTYSTR        ;START THE TTY TYPING
343: IOG3A:  AOBJN   J,IOG3          ;SEND MESSAGE TO ALL TTY'S.
344: 
345: IFN FTDDT,<
346:         PUSHJ   P,DISMES        ;INCASE LOWCOR GETS CLOBBERED.
347:         ASCIZ   /DDT STARTS AT /
348:         HRRZ    TAC,SYSDSP+1
349:         PUSHJ   P,DISLOC
350:         PUSHJ   P,DISCRLF
351: >
352: ;       MOVE    TAC,THSDAT      ;APRIL 1 HACK.
353: ;       IDIVI   TAC,=12*=31     ;DIVIDE TO GET YEARS IN TAC, DAY OF YEAR IN TAC1
354: ;       CAIN    TAC1,=31*3      ;APRIL 1?
355: ;       SETOM   AFOOL           ;YES.
356:         
357: 
358:         SETZM   INIMES          ;CLEAR FOR NEXT TIME
359:         SETZB   J,JOB           ;INDICATE JOB ZERO
360:         MOVE    PID,[P1PID]     ;INDICATE P1
361:         JRST    NULJOB          ;START THE NULL JOB.
    SYSINI page# 0007 next  prev
363: ; P2 INITIALIZE ROUTINE
364: 
365: P2INI: MOVE    TAC,[XWD P2DATA,P2DATA+1]
366:         CONO    PI,10400        ; CLEAR PI SYSTEM
367:         SETZB   J,P2DATA
368:         BLT     TAC,P2DATA+PDATALEN-1
369:         CONO    APR,733550+APRCHN       ; CLEAR EVERYTHING, ENABLE EVERYTHING
370:         MOVE    P,[IOWD ERRPLN,ERRPDL+P2PID]
371:         MOVE    TAC,[JRST P2UUO1]
372:         MOVEM   TAC,UUO0+P2PID+1
373:         MOVE    TAC,[JRST P2UUO3]
374:         MOVEM   TAC,UUO2+P2PID+1
375:         MOVEI   TAC,40
376:         MOVE    TAC1,P2NUM
377:         TLNE    TAC1,MAOFF
378:         MOVEI   TAC,140
379:         MOVEM   TAC,UUOLOC+P2PID
380:         MOVE    TAC,[POINT 36,CIPWT+P2PID-1,35]
381:         MOVEM   TAC,CLOCK+P2PID
382:         MOVEI   TAC,CAT(P2CH,\APRCHN)
383:         MOVEM   TAC,APRCH+P2PID
384:         MOVEI   TAC,CAT(P2CH,\CLKCHN)
385:         MOVEM   TAC,CLKCH+P2PID
386:         MOVE    TAC,[P1PID]
387:         MOVEM   TAC,OTHERID+P2PID
388:         MOVEI   TAC,AP2CON
389:         MOVEM   TAC,APRCN+P2PID
390:         MOVEI   TAC,CL2SAVE
391:         MOVEM   TAC,CLKSV+P2PID
392:         MOVEI   TAC,CL2ESAVE
393:         MOVEM   TAC,CLKESV+P2PID
394:         MOVE    TAC,[JEN @UUO0+P2PID]
395:         MOVEM   TAC,UUOXIT+P2PID
396:         MOVEM   TAC,UUOXI+P2PID
397:         SETZM   JOB+P2PID
398:         SETZM   JOBADR+P2PID
399:         SETZM   USRREL+P2PID
400:         MOVE    PID,[P2PID]
401:         MOVEM   PID,APRID(PID)
402:         MOVE    TAC,[IOWD ERRPLN,ERRPDL+P2PID]
403:         MOVEM   TAC,ERRPD(PID)
404:         MOVE    TAC,[IOWD APRPLN,APRPD+P2PID]
405:         MOVEM   TAC,APRPDL(PID)
406:         MOVE    TAC,CH3
407:         CAMN    TAC,CH3                 ; WAIT FOR P1 TO START TAKING CLOCK BREAKS
408:         JRST    .-1
409:         XCT     P2CON                   ; ENABLE PI, PARITY, ETC.
410: 
411:         PUSHJ   P,XGPIN2                ;INITIALIZE XGP FROM P2
412:         PUSHJ   P,PTRREL                ;INITIALIZE PTR FROM P2
413: 
414:         PUSHJ   P,DISMES
415:         ASCIZ/↓
416: PDP-6 STARTED /
417:         PUSHJ   P,DISDATE
418: 
419: 
420:         JRST    NULJOB
421: 
422: ; POWER DOWN ROUTINES
423: 
424: PWROFF:
425:         CONO    PI,PIOFF                ; NO MORE INTERRUPTS NOW
426:         EXCH    17,PWRCNT               ; AND COUNT DOWN
427:         SOJG    17,.                    ;LOOP
428:         MOVEI   17,-1                   ; COUNT DONE, NO POWER DOWN AFTER ALL
429:         EXCH    17,PWRCNT               ;RESTORE 17
430:         AOS     P1OFF                   ;COUNT FAILURES
431:         CONO    PI,PION                 ;ENABLE INTERRUPTS
432:         JEN     @CH3    
433: 
434: P2ROFF:
435:         CONO    PI,PIOFF
436:         EXCH    17,P2RCNT
437:         SOJG    17,.
438:         MOVEI   17,-1
439:         EXCH    17,P2RCNT
440:         AOS     P2OFF                   ;COUNT FAILURES ON SIX ALSO
441:         CONO    PI,PION
442:         JEN     @P2CH3
443: 
444: MCELTB: TTYLOK
445:         MAINTM
446:         DDOFF
447:         DEBMOD
448:         XWD     400000,DDTSWP           ;COMPLEMENT SENSE OF SWITCH
449:         0                               ;R. HELLIWELL MEMORIAL CELL
450:         EXPMOD                          ;SET TO MAKE LOGIN TYPE X.TXT[2,2]
451:         NOLOGIN                         ;SET TO PREVENT LOGIN
452: IFN IMPSW,<IMPDIE;>0                    ;NO IMP TODAY
453: IFN IMPSW,<IMPPMS;>0                    ;SET TO ALLOW IMP TO COMPLAIN ON CTY
454:         BLTSWP                          ;SET FOR BLT AFTER SWAPIN.
455:         IEARLY                          ;PRINTOUT EACH IOP EARLY RESPONSE
456: NMCELS←←.-MCELTB
457:         BEND    SYSINI
 EOF: SYSINI end-of-file. cnt=6